package ren.kane.phoenix.util.reflect;

/**
 * @author renrk(1275) on 2019-08-13 4:36 PM
 **/
public class ClassTest {
    public static void main(String[] args) {
        try {
            Class<?> clazz = Class.forName("ren.kane.phoenix.util.reflect.Person1");
            Object object = clazz.newInstance();
            System.out.println("clazz=" + clazz);

            Class clazz1 = Person1.class;
            Class clazz2 = new Person1().getClass();
            Class clazz3 = "ren.kane.phoenix.util.reflect.Person1".getClass();
            System.out.printf("clazz1=%s\nclazz2=%s\nclazz3=%s\n", clazz1, clazz2, clazz3);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

class Person1 {
    public Person1() {
        System.out.println("create Person1");
    }
}